/**
 * @author   zhangyp
 * @created  2013-10-11 下午3:28:31
 * @email    zviolet@163.com
 * TODO
 */
package com.bible.fire.api.baidumap;

import android.util.Log;

import com.baidu.mapapi.map.MKOLUpdateElement;
import com.baidu.mapapi.map.MKOfflineMap;
import com.baidu.mapapi.map.MKOfflineMapListener;

public class BaiduMapMKOfflineListener implements MKOfflineMapListener {
	
	private MKOfflineMap mOffline = null;
	
	public BaiduMapMKOfflineListener( MKOfflineMap mOffline){
		this.mOffline = mOffline;
	}

	@Override
    public void onGetOfflineMapState(int type, int state) {  
        switch (type) {  
            case MKOfflineMap.TYPE_DOWNLOAD_UPDATE:  
                {  
                    MKOLUpdateElement update = mOffline.getUpdateInfo(state);  
                    //mText.setText(String.format("%s : %d%%", update.cityName, update.ratio));  
                }  
                break;  
            case MKOfflineMap.TYPE_NEW_OFFLINE:  
                Log.d("百度离线地图", String.format("新安装%d个离线地图", state));  
                break;  
            case MKOfflineMap.TYPE_VER_UPDATE:  
                Log.d("百度离线地图", String.format("有离线地图更新"));  
                break;  
        }      
    }
    
  }
